package com.bgrconsulting.stockorderentry.service.converter.response;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

import com.bgrconsulting.stockorderentry.service.model.response.AccountBalanceResponse;

import com.bgrconsulting.stockorderentry.service.converter.AccountBalanceConverter;
import com.bgrconsulting.stockorderentry.service.converter.CashAccountBalanceConverter;
import com.bgrconsulting.stockorderentry.service.converter.MarginAccountBalanceConverter;
import com.bgrconsulting.stockorderentry.service.converter.response.AccountBalanceResponseConverter;


@XmlRootElement(name = "accountBalanceResponse")
public class AccountBalanceResponseConverter {
	private AccountBalanceResponse enity = null;
	
	public AccountBalanceResponseConverter() {
		enity = new AccountBalanceResponse();
	}
	
	public AccountBalanceResponseConverter(AccountBalanceResponse accountBalanceResponse) {
		enity = accountBalanceResponse;
	}
	
	@XmlElement(name = "accountId")
	public String getAccountId() {
		return enity.getAccount().getAccountId();
	}
	
	@XmlElement(name = "accountType")
	public String getAccountType() {
		return enity.getAccount().getRegistrationType();
	}
	
	@XmlElement(name = "optionLevel")
	public String getOptionLevel() {
		return enity.getAccount().getOptionLevel();
	}
	
	@XmlElement(name = "accountBalance")
	public AccountBalanceConverter getAccountBalance() {
		
		AccountBalanceConverter abc = new AccountBalanceConverter(enity.getAccountBalance());
		
		return abc;
	}
	
	@XmlElement(name = "margineAccountBalance")
	public MarginAccountBalanceConverter getMarginAccountBalance() {
		
		MarginAccountBalanceConverter mabc = new MarginAccountBalanceConverter(enity.getMarginAccountBalance());
		
		
		return mabc;
	}
	
	
	@XmlElement(name = "cashAccountBalance")
	public CashAccountBalanceConverter getCashAccountBakance() {
		
		CashAccountBalanceConverter cabc = new CashAccountBalanceConverter(enity.getCashAccountBalance());
		return cabc;
	}
}
